package cn.wolfcode.service;

import cn.wolfcode.domain.Department;
import cn.wolfcode.domain.Employee;
import cn.wolfcode.qo.EmployeeQueryObject;
import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Param;
import org.apache.poi.hssf.usermodel.HSSFWorkbook;
import org.apache.poi.ss.usermodel.Workbook;
import org.springframework.web.multipart.MultipartFile;

import java.io.IOException;
import java.util.List;

public interface IEmployeeService {
    void save(Employee employee, Long[] ids);
    void delete(Long id);
    void update(Employee employee, Long[] ids);
    Employee get(Long id);
    List<Employee> listAll();

    //分页查询的方法
    PageInfo<Employee> query(EmployeeQueryObject qo);
    //登录
    //Employee login(@Param("username") String username, @Param("password") String password);

    //修改密码的方法
    void updatePwd(String oldPassword,String newPassword);
    //禁用恢复的方法
    void change(boolean status,Long id);

    void batchDelete(Long[] ids);

    Employee selectByName(String name);

    Workbook exportXls();

    void importXls(MultipartFile file) throws IOException;

    //根据角色编码查询员工
    List<Employee> selectByRoleSn(String... sns);
}
